package router

import (
	"class/api/handler"
	"github.com/gin-gonic/gin"
)

func Router(r *gin.Engine) {
	r.POST("courseAdd", handler.CourseAdd)
	r.GET("courseList", handler.CourseList)
	r.GET("reviewList", handler.ReviewList)
	r.POST("review", handler.Review)
	r.POST("reviewAdd", handler.ReviewAdd)
	ChatHandler := handler.NewChatHandler()
	chat := r.Group("/api")
	chat.GET("chat", ChatHandler.Chat)
	r.GET("videoList", handler.VideoList)
	r.GET("videoShow", handler.VideoShow)
	r.POST("dan", handler.Dan)
	r.GET("messageList", handler.MessageList)
	r.GET("videoP", handler.VideoP)
	r.POST("VideoCreate", handler.VideoCreate)
}
